<?php
/**
 * ============================================================================
 * 版权所有 2008-2011 多多网络，并保留所有权利。
 * 网站地址: http://soft.duoduo123.com；
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用；不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
session_start();
error_reporting(0);
include_once 'comm/config.php';
include_once 'comm/checkpostandget.php';
include_once 'comm/page.class.php';

$cid=$_GET['cid'];
$page = !($_GET['page'])?'1':intval($_GET['page']);
$pagesize=20;
$page2=($page-1)*$pagesize;

$sql="select * from ".$BIAOTOU."category  where id=".$cid;
$rscat=mysql_query($sql);
while ($row = mysql_fetch_array($rscat))
{
	$catname=$row['name'];
}

$sql="select * from ".$BIAOTOU."article where cid=".$cid."";
$rs = mysql_query($sql);
$total = mysql_num_rows($rs);

$sql="select * from ".$BIAOTOU."article where cid=".$cid." order by ontop desc,pubdate desc  limit $page2,$pagesize";
$rsnewslist=mysql_query($sql);
//文章分类
$sql="select * from ".$BIAOTOU."category order by seq desc";
$newstype=mysql_query($sql);
//热门文章
$sql="select * from ".$BIAOTOU."article where hot=1 order by created_date desc  limit 0,10";
$hotnews=mysql_query($sql);

//热门店铺
//$sql="select * from ".$BIAOTOU."shop order by level desc, addtime desc  limit 0,6";
//$rsshop=mysql_query($sql);

include_once 'comm/wjt.php';
if($cid=='1'){
	$tag="help";
}else{
	$tag="article";
}
//引入模版文件
include 'template/'.MOBAN.'/article_list.tpl.php';
mysql_close($cfg_link);
?>